﻿////////////////////////////////////////////////////////////////////////
//Autor: Gabriel Tame Borao  - gabrieltame@yahoo.es 
//Fecha: 2010/09/15 01:26
//Solucion: GTameReport.sln
//Proyecto: GTameReport
//Fichero: DataPointType.cs
//
//	Copyright (C) 2010  Gabriel Tame Borao (GTB)
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////
namespace GTameReport
{
    using Rdl;
    using System;
    using System.Collections;

    public class DataPointType
    {
        private GTameReport.ActionType _Action;
        private string _DataElementName;
        private DataPointTypeDataElementOutput _DataElementOutput;
        private GTameReport.DataLabelType _DataLabel;
        private GTameReport.DataValuesType _DataValues;
        private GTameReport.MarkerType _Marker;
        private GTameReport.StyleType _Style;

        public Rdl.DataPointType Write()
        {
            Rdl.DataPointType type = new Rdl.DataPointType();
            ArrayList list = new ArrayList();
            if (this._Action != null)
            {
                list.Add(this._Action.Write());
            }
            if (this._DataElementName != null)
            {
                list.Add(this._DataElementName);
            }
            list.Add(this._DataElementOutput);
            if (this._DataLabel != null)
            {
                list.Add(this._DataLabel.Write());
            }
            if (this._DataValues != null)
            {
                list.Add(this._DataValues.Write());
            }
            if (this._Marker != null)
            {
                list.Add(this._Marker.Write());
            }
            if (this._Style != null)
            {
                list.Add(this._Style.Write());
            }
            type.Items = list.ToArray();
            list = null;
            return type;
        }

        public GTameReport.ActionType Action
        {
            get
            {
                if (this._Action == null)
                {
                    this._Action = new GTameReport.ActionType();
                }
                return this._Action;
            }
            set
            {
                this._Action = value;
            }
        }

        public string DataElementName
        {
            get
            {
                return this._DataElementName;
            }
            set
            {
                this._DataElementName = value;
            }
        }

        public DataPointTypeDataElementOutput DataElementOutput
        {
            get
            {
                return this._DataElementOutput;
            }
            set
            {
                this._DataElementOutput = value;
            }
        }

        public GTameReport.DataLabelType DataLabel
        {
            get
            {
                if (this._DataLabel == null)
                {
                    this._DataLabel = new GTameReport.DataLabelType();
                }
                return this._DataLabel;
            }
            set
            {
                this._DataLabel = value;
            }
        }

        public GTameReport.DataValuesType DataValues
        {
            get
            {
                if (this._DataValues == null)
                {
                    this._DataValues = new GTameReport.DataValuesType();
                }
                return this._DataValues;
            }
            set
            {
                this._DataValues = value;
            }
        }

        public GTameReport.MarkerType Marker
        {
            get
            {
                if (this._Marker == null)
                {
                    this._Marker = new GTameReport.MarkerType();
                }
                return this._Marker;
            }
            set
            {
                this._Marker = value;
            }
        }

        public GTameReport.StyleType Style
        {
            get
            {
                if (this._Style == null)
                {
                    this._Style = new GTameReport.StyleType();
                }
                return this._Style;
            }
            set
            {
                this._Style = value;
            }
        }
    }
}

